<template>
  <!-- 商品列表  账号池 -->
  <div class="app-container jklis">
    <div class="zdy-main customTab">
      <el-tabs type="border-card" v-model="actived" @tab-click="tabChange" >
        <el-form :model="queryParams" ref="queryForm" :inline="true" class="zdy-form search-form-new" label-width="68px" @keyup.enter.native="search" >
          <el-form-item label="店铺" prop="tenantId">
            <el-select v-if="actived == '2'" v-model="queryParams.tenantId" placeholder="请选择店铺" clearable filterable>
              <el-option v-for="dict in merchantsList" :key="dict.tenantId" :label="dict.tenantName" :value="dict.tenantId" />
            </el-select>
              <el-select v-else v-model="queryParams.tenantId" placeholder="请选择店铺" clearable filterable>
              <el-option v-for="dict in tenantList" :key="dict.tenantId" :label="dict.tenantName" :value="dict.tenantId" />
            </el-select>
          </el-form-item>
          <el-form-item label="游戏" prop="gameId">
            <el-select v-model="queryParams.gameId" placeholder="请选择游戏" clearable @change="selectGameType">
              <el-option v-for="dict in allGameList" :key="dict.id" :label="dict.name" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="系统" prop="systemId" v-if="GameSelectedType === 0">
            <el-select v-model="queryParams.systemId" placeholder="请选择" clearable @change="search" filterable>
              <el-option v-for="dict in sysList" :key="dict.id" :label="dict.fieldName" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="运营商" prop="carrierId" v-if="GameSelectedType === 0">
            <el-select v-model="queryParams.carrierId" placeholder="请选择" clearable @change="getAreaList" filterable>
              <el-option v-for="dict in carrierList" :key="dict.id" :label="dict.fieldName" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="大区" prop="groupId">
            <el-select v-model="queryParams.groupId" placeholder="请选择" clearable @change="getServiceList" filterable>
              <el-option v-for="dict in areaList" :key="dict.id" :label="dict.fieldName" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="服务器" prop="serverId">
            <el-select v-model="queryParams.serverId" placeholder="请选择" clearable @change="search" filterable>
              <el-option v-for="dict in serverList" :key="dict.id" :label="dict.fieldName" :value="dict.id" />
            </el-select>
          </el-form-item>
          <el-form-item label="价格" prop="price" class="mm-b-8">
            <div class="two-input-content">
              <el-input placeholder="最低价" v-model="queryParams.priceStart" class="two-input-item" style="width:100px !important"></el-input>
              <span>-</span>
              <el-input placeholder="最高价" v-model="queryParams.priceEnd" class="two-input-item" style="width:100px !important"></el-input>
            </div>
          </el-form-item>
          <!-- <el-form-item v-hasPermi="['goods:list:searchSupply']" label="创建人" prop="createIds">
            <virtual-select v-model="queryParams.createIds" :list="allUsers" label="nickName" value="userId" :placeholder="'输入关键字用于搜索用户'" :keeps-params="20" :is-concat="false" :concat-symbol="' || '" :is-multiple="true" :disabled="false" :allow-create="false" />
          </el-form-item> -->

          <!-- <el-form-item label="商品描述" prop="des">
            <el-input v-model="queryParams.des" placeholder="请输入商品描述" clearable />
          </el-form-item> -->
          <el-form-item label="商品编号" prop="id">
            <el-input v-model="queryParams.id" placeholder="请输入商品编号" clearable />
          </el-form-item>
          <!-- <el-form-item label="游戏账号" prop="accountNumber">
            <el-input v-model="queryParams.accountNumber" placeholder="请输入游戏账号" clearable />
          </el-form-item> -->
          <!-- <el-form-item label="自编号" prop="thirdId">
            <el-input v-model="queryParams.thirdId" placeholder="请输入自编号" clearable />
          </el-form-item> -->
          <el-form-item label="关键字" prop="keyWord">
            <el-input v-model="queryParams.keyWord" placeholder="多个关键字用空格隔开" clearable />
          </el-form-item>
          <el-form-item class="btns">
            <el-button type="primary" icon="el-icon-search" @click="search">搜索</el-button>
            <el-button type="warning" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
            <el-button type="primary" plain icon="el-icon-search" @click="openMoreSearch">更多搜索</el-button>
            <el-button v-hasPermi="['goods:list:copyBatch']" type="primary" plain icon="el-icon-document-copy" @click="copyBatch">批量复制</el-button>
          </el-form-item>
        </el-form>
        <el-tab-pane :label="tab.name" :name="tab.value" v-for="tab in statusList" :key="tab.value">

          <div class="table_box" v-loading="loading">
            <el-table stripe :data="tableData.records" @sort-change="sortFun" style="width: 100%" @selection-change="handleSelection">
              <el-table-column type="selection" width="55"></el-table-column>
              <el-table-column label="商品编号" width="100" prop="id" >
                <template slot-scope="scope">
                  <div @click="viewGoods(scope.row.id)" class="link">{{ scope.row.id }}</div>
                </template>
              </el-table-column>
              <el-table-column label="游戏名称" width="100" prop="gameName" />
              <el-table-column label="区服" width="130" prop="systemName">
                <template slot-scope="scope">
                  <span>{{ scope.row.systemName ? scope.row.systemName + '/' : '' }}</span>
                  <span>{{ scope.row.carrierName ? scope.row.carrierName + '/' : '' }}</span>
                  <span>{{ scope.row.groupName ? scope.row.groupName + '/' : '' }}</span>
                  <span>{{ scope.row.serverName }}</span>
                </template>
              </el-table-column>
              <el-table-column label="实名" width="110" prop="shiming" />
              <el-table-column sortable="custom" sort-by label="商品价格" width="130" prop="price" />
              <el-table-column sortable="custom" sort-by label="提号价格" width="130" prop="price">
                <template slot-scope="scope">
                  <div v-if="shopInfo">
                    <div v-if="scope.row.rise != 10 && scope.row.tenantId != shopInfo.tenantId">
                      {{ getRise(scope.row) }}<span style="font-size: 13px;color: red;margin-left: 2px;">({{ scope.row.rise }}折)</span>
                    </div>
                    <div v-else>{{ scope.row.price }}</div>
                 </div>
                 <div v-else>{{ scope.row.price }}</div>
                </template>
                </el-table-column>
              <el-table-column label="商品简介" min-width="200" prop="title">
                <template slot-scope="scope">
                  <div @click="viewGoods(scope.row.id)" class="zdy-des">{{ scope.row.des }}</div>
                </template>
              </el-table-column>
              <el-table-column sortable="custom" sort-by label="发布时间" width="100" prop="createTime" />
              <el-table-column label="所属店铺" prop="supplyName">
                <template slot-scope="scope">
                  <div v-if="allYouzhiMap&&allYouzhiMap[scope.row.tenantId]">
                    <youzhiName :name="scope.row.supplyName"></youzhiName>
                  </div>
                  <div v-else>
                    {{ scope.row.supplyName }}
                  </div>

                </template>

              </el-table-column>
              <el-table-column label="操作" width="120">
                <template slot-scope="scope">
                  <el-button type="text" @click="openIM(scope.row)">联系他</el-button>
                  <el-button v-if="checkPermi(['caigoudingdan'])" type="text" @click="openAddOrder(scope.row)">立即提号</el-button>
                  <!-- <el-button type="add" @click="viewGoods(scope.row.id)">详情预览</el-button> -->
                </template>
              </el-table-column>
            </el-table>
            <pagination v-show="tableData.total > 0" :total="tableData.total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
          </div>
        </el-tab-pane>
      </el-tabs>
    </div>
    <!-- <div class="pages-box">

      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
        :current-page="queryParams.pageNum" :page-sizes="[10, 20, 30, 40, 50, 60]" :page-size="queryParams.pageSize"
        layout="total, sizes, prev, pager, next" :total="tableData.total"></el-pagination>
    </div> -->
    <!-- 一下是弹出框 -->
    <!-- <h5Dialog ref="h5Dialog"></h5Dialog> -->

    <moreSearch ref="moreSearch" @sureSearch="sureSearch"></moreSearch>

    <viewInfo ref="viewInfo"></viewInfo>
    <!-- 联系对方 -->
    <kefuList ref="kefuList"></kefuList>
    <!-- 立即提号 -->
    <fenxiaoPickDialog ref="fenxiaoPickDialog"></fenxiaoPickDialog>
    <!-- 立即提自己的号 -->
   <pickDialog ref="pickDialog"></pickDialog>

   <!-- 商品详情 -->
   <huliandaishouGoodsInfoDetail ref="huliandaishouGoodsInfoDetail"></huliandaishouGoodsInfoDetail>
  </div>
</template>

<script>
import {
  getMorePrice,
  getOutIds,
  getSupPhoneNumber,
  auditInfo
} from "@/api/info/info";
import { allList } from "@/api/partner/partner";
import moreSearch from "./moreSearch.vue";
import goodsListApi from "../../../api/gameConfig/goodsList";
import gameDictionaryApi from "../../../api/gameConfig/gameDictionary";

import viewInfo from "./viewGoodsInfo.vue";
import selectTenant from "@/components/selectTenant/index.vue";
import { getToken } from "@/utils/auth";
import kefuList from "@/components/common/kefuList.vue";
import fenxiaoPickDialog from "../saleManage/components/fenxiaoPickDialog.vue";


import {  getMerchants } from "@/api/tenantApis/indexStatistics.js";


import pickDialog from "../saleOrder/components/pickDialog";

import huliandaishouGoodsInfoDetail from "../huliandaishou/huliandaishouGoodsInfoDetail.vue";

export default {
  name: "GoodsPool",
  components: {
    moreSearch,
    viewInfo,
    selectTenant,
    kefuList,
    fenxiaoPickDialog,
    pickDialog,
    huliandaishouGoodsInfoDetail
  },
  data() {
    return {
      autoImgQrcodeShow: false,
      autoImgQrcode: "",
      importheaders: {
        Authorization: "Bearer " + getToken(),
        timeout: 1000 * 60 * 10,
      },
      showInportVisible: false,
      outIdsData: [],
      supPhoneNum: "",
      allUsers: [], //所有用户列表
      tableData: {
        records: [],
        total: 10000,
      },
      pageType: "",

      statusList: [
        {
          name: "全部货源",
          value: "1",
        },
        {
          name: "优质货源",
          value: "2",
        },
        
      ],
      actived: "1",
      GameSelectedType: "", //筛选的游戏的类型
      sysList: [],
      carrierList: [], //运营商列表
      areaList: [], //大区列表
      serverList: [], //服务器列表
      selects: [], //表格的选中项
      ids: [], //表格选中的ids
      pushApiList: [],
      morePrice: [], //更多价格

      supplyList: [],
      levelArr: [],
      irreAttr: false, //隐藏无关字段
      sinNumShow: "",
      unsoldFrom: {
        note: null,
      },
      showDialogTitle: "",
      dialogFormVisible: false,
      tempData: null,
      loading: false,
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        saleState: "1",
        createIds: [],
        sort: "",
        sortColumn: "",
        dataType: "all",
        tenantId:'',
        isQuality:null,
      },
      regionalArr: [], //区服列表
      copyVlaue: "",
      customAttr: null,
      retailDomainList: [],
      xiaoshouguize: "",
      importUrl: process.env.VUE_APP_BASE_API + "/goods/info/importData",
      isUploading: false,

      merchantsList:[], //优质商家
    };
  },
  created() {
  if(this.$route.query.tenantId) {
      this.queryParams.tenantId = Number(this.$route.query.tenantId);
  }
    this.getList();
    //如果是优质商家 

    this.getMerchants()


    // this.getPushList();
    // this.getAllUserList();
  },
  computed: {
    tenantList() {
      return this.$store.getters.tenantList;
    },
    shopInfo() {
      return this.$store.getters.shopInfo;
    },
    allYouzhiMap() {
      return this.$store.getters.allYouzhiMap;
    },
    allGameList() {
      return this.$store.getters.allGameList;
    },
  },
  methods: {
    getMerchants() {
      getMerchants().then(res => {
        this.merchantsList = res.data;
      });
    },
    getRise(row) {
      return Math.round(row.price * (row.rise / 10))
    },
    viewInfo(row) {
      this.$refs.viewInfo.open(row);
    },
     // 查看商品详情页
     viewGoods(goodsId) {
      this.$refs.huliandaishouGoodsInfoDetail.open(goodsId);
    },
    // 根据传进来的参数进行搜索
    searchByParams(params){
      this.queryParams.tenantId = params.tenantId
      this.search()

    },
    // 联系客服
    openIM(row) {
      // 打开客服列表
      this.$refs.kefuList.open(row.tenantId, 1, {
        gameId: row.gameId,
        gameName: row.gameName,
      });
    },
    // 立即下单  打开下单弹窗
    async openAddOrder(row) {
      if (row.tenantId == this.shopInfo.tenantId) {
        this.$refs.pickDialog.open(row, "kefu");
      }else {
        this.$refs.fenxiaoPickDialog.open(row);
      }
    },
    // // 获取供货商的包赔配置
    // async getSupplyGuaranteeConfig(tenantId) {
    //   this.baopeiList = [];
    //   try {
    //     const res = await customerServiceApi.getConfigByTenantId({
    //       configKey: "payOnline",
    //       tenantId: tenantId,
    //     });
    //     if (res.data && res.data.configValue == 2) {
    //       return false;
    //     } else {
    //       return true;
    //     }
    //   } catch (error) {
    //     return false;
    //   }
    // },

    openUrl(url) {
      window.open(url);
    },
    // 供货手机号
    getSupPhone(row) {
      this.supPhoneNum = "";
      getSupPhoneNumber({ userId: row.createId }).then((res) => {
        this.supPhoneNum = res.msg;
      });
    },
    // 更多价格
    getMore(row) {
      ////console.log("%c Line:1303 🍐 row", "color:#33a5ff", row);
      getMorePrice({ infoid: row.id }).then((res) => {
        ////console.log("%c Line:1304 🥚 res", "color:#7f2b82", res);
        this.morePrice = res.data;
      });
    },
    // 查询账号的三方ID
    getoutId(row) {
      getOutIds(row.id).then((res) => {
        ////console.log("%c Line:490 🍪 res", "color:#f5ce50", res);
        this.outIdsData = res.data;
      });
    },
    // // 获取分销站域名
    // getDomain() {
    //   getDicts("retailDomain").then((res) => {
    //     if (res.code == 200) {
    //       this.retailDomainList = res.data;
    //     }
    //   });
    // },

  
    // 获取列表
    getList() {
      this.tableData.records = [];
      this.loading = true;
      goodsListApi
        .getGoodsListPool(this.queryParams)
        .then((response) => {
          this.$nextTick(() => {
            this.loading = false;
            this.tableData.records = JSON.parse(JSON.stringify(response.rows));
            // this.tableData.total = response.total;
          });
        })
        .catch((err) => {
          this.loading = false;
        });
    },
    // //获取供货商接口
    // getUserList() {
    //   getSupplyList("supplyCustomer").then(res => {
    //     if (res.code == 200) {
    //       this.supplyList = res.data;
    //     }
    //   });
    // },
    // 获取推送接口列表
    getPushList() {
      allList({ status: 1 }).then((res) => {
        this.pushApiList = res.rows;
      });
    },
    // 打开更多搜索弹窗
    openMoreSearch() {
      if (!this.queryParams.gameId) {
        return this.$alert("请先选择游戏名称！");
      }
      this.$refs.moreSearch.open(this.queryParams.gameId);
    },
    // 更多搜索确认
    sureSearch(form) {
      this.queryParams = { ...this.queryParams, ...form };
      this.search();
    },
    // 搜索
    search() {
      this.queryParams.pageNum = 1;
      this.queryParams.pageSize = 10;
      this.getList();
    },
    // 隐藏无关属性
    onOfOff() {
      const list = JSON.parse(JSON.stringify(this.tableData.records));
      this.tableData.records = [];
      this.loading = true;
      setTimeout(() => {
        this.$nextTick(() => {
          this.tableData.records = JSON.parse(JSON.stringify(list));
          this.loading = false;
        });
      }, 300);
    },
    // 表格排序
    sortFun(val) {
      this.queryParams.sort = val.order;
      this.queryParams.sortColumn = val.prop;
      this.getList();
    },
    // tabs切换时触发
    tabChange() {
     
    
      this.resetQuery();
    },
    // 新增
    addACount() {
      this.$refs.addDialog.open("add");
    },
    showLogs(id) {
      this.$refs.showLogs.open(id);
    },
    // 转自售
    openOnSelf(row) {
      this.$refs.onSelfDialog.open(row);
    },
    // 表格选择项改变
    handleSelection(arr) {
      ////console.log("%c Line:442 🍆 表格选择改变", "color:#f5ce50", arr);
      this.selects = arr;
      this.ids = [];
      if (arr.length == 0) {
        this.ids = [];
      } else {
        arr.forEach((t) => {
          this.ids.push(t.id);
        });
      }
    },
    // 审核账号
    checkAccountFn(row) {
      let ids = [];
      if (row) {
        ids = row.id;
      } else {
        if (this.ids && this.ids.length > 0) {
          ids = this.ids.join(",");
        } else {
          this.$alert("请先选择账号！");
          return;
        }
      }
      if (ids) {
        this.$modal
          .confirm("确认审核通过吗？")
          .then(() => {
            this.loading = true;
            goodsListApi.auditGoods(ids).then((res) => {
              this.loading = false;
              this.$alert(res.msg);
              this.getList();
            });
          })
          .catch(() => {});
      }
    },
    // 打开全部删除弹窗
    deleteAll() {
      this.$refs.deleteDialog.open();
    },
    // 批量下架
    piliangXiajia() {
      const ids = this.ids.join(",");
      if (!ids) {
        return this.$alert("请先选择数据！");
      }
      let that = this;
      this.$modal
        .confirm('是否确认下架编号为"' + ids + '"的数据项？')
        .then(function () {
          that.loading = true;
          goodsListApi
            .batchDown(ids)
            .then((res) => {
              that.loading = false;
              that.getList();
              that.$modal.msgSuccess(res.msg);
            })
            .catch((err) => {
              that.$modal.msgSuccess(err.msg);
            });
        })
        .catch(() => {});
    },
    // 批量复制
    copyBatch() {
      if (this.selects.length) {
        let str = "";

        this.selects.forEach((item) => {
          // let hostt = `${this.retailDomainList[0].dictValue}/#/pages/detail/index?id=${item.id}`
          // \n图片：${hostt}
          str = `${str}商品ID：${item.id}\n区服：${
            item.systemName ? item.systemName + "/" : ""
          }${item.carrierName ? item.carrierName + "/" : ""}${item.groupName}${
            item.serverName
          }\n简介：${item.des}\n ===================== \n`;
        });
        this.$copyText(str).then(
          (e) => {
            this.$message({
              type: "success",
              message: "已复制到剪切板！",
            });
          },
          function (e) {}
        );
      } else {
        return this.$alert("请先选择数据！");
      }
    },
    // 删除
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids.join(",");
      if (!ids) {
        return this.$alert("请先选择数据！");
      }
      let that = this;
      this.$modal
        .confirm('是否确认删除游戏账号编号为"' + ids + '"的数据项？')
        .then(function () {
          that.loading = true;
          goodsListApi
            .delGoods(ids)
            .then((res) => {
              that.$modal.msgSuccess(res.msg);
              that.getList();
            })
            .catch((err) => {
              that.loading = false;
              that.getList();
            });
        })
        .catch(() => {});
    },
    // 批量推送
    // 推送
    pushBatch(item) {
      if (this.ids.length > 1) {
        this.$modal.msgError("只能选择一条数据");
        return true;
      } else if (this.ids.length == 0) {
        this.$modal.msgError("请先选择一条数据");
        return true;
      }
      this.$refs.pushDialog.open({
        id: this.ids[0],
        configId: item,
      });
    },


    // 店铺改变
    tenantChange(e) {
      this.queryParams.tenantId = e;
    },
    // 选择游戏
    selectGameType(val) {
      if (!val) {
        val = null;
        this.sysList = [];
        this.carrierList = [];
        this.areaList = [];
        return;
      }
      let dataType = this.queryParams.dataType;
      this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        saleState: "",
        // operType: "supply",
        sort: "",
        sortColumn: "",
        dataType: dataType,
      };
      this.queryParams.saleState = 1;

      this.allGameList.forEach((r) => {
        if (r.id == val) {
          this.GameSelectedType = r.type;
          this.queryParams.gameId = val;
          // this.queryParams.gameName = r.name;
        }
      });
      if (this.GameSelectedType === 0) {
        // 手游
        // 获取系统列表和运营商列表
        this.getSysList();
        this.getYysList();
      } else {
        // 端游
        // 获取大区列表
        this.getAreaList2();
      }

      this.search();
    },
    // 获取系统列表
    getSysList() {
      gameDictionaryApi
        .getChildList({
          gameId: this.queryParams.gameId,
          systemKey: "system",
        })
        .then((res) => {
          this.sysList = res.rows;
        });
    },
    // 获取运营商列表
    getYysList() {
      gameDictionaryApi
        .getChildList({
          gameId: this.queryParams.gameId,
          systemKey: "carrier",
        })
        .then((res) => {
          this.carrierList = res.rows;
        });
    },
    // 运营商改变  获取大区列表
    getAreaList(e) {
      this.search();
      let obj = {
        gameId: this.queryParams.gameId,
        systemKey: "group",
      };
      this.queryParams.groupId = "";
      this.queryParams.serverId = "";

      // 运营商改变 找出选择的运营商的对象
      if (e) {
        this.carrierList.forEach((i) => {
          if (i.id == e) {
            obj.systemKey = i.systemKey + "group";
          }
        });
      }
      gameDictionaryApi.getChildList(obj).then((res) => {
        this.areaList = res.rows;
      });
    },
    // 大区改变  获取服务器列表
    getServiceList(e) {
      this.search();
      this.queryParams.serverId = "";

      if (e) {
        gameDictionaryApi
          .getList({
            parentId: e,
          })
          .then((res) => {
            this.serverList = res.rows;
          });
      } else {
        this.serverList = [];
      }
    },
    //端游 直接获取大区
    getAreaList2() {
      let obj = {
        gameId: this.queryParams.gameId,
        systemKey: "group",
      };
      gameDictionaryApi.getChildList(obj).then((res) => {
        this.areaList = res.rows;
      });
    },
    // 加入掉绑监控
    addCheck(row) {
      let reg = new RegExp(/^[1-9][0-9]{4,10}$/);
      let reg2 = new RegExp(/^(1[0-9][0-9])\d{8}$/);
      let tel = "";
      if (row.saleState == 1) {
        // 未售 加入掉绑  手机号取 securityPhone
        tel = row.securityPhone;
      } else if (row.saleState == 3) {
        // 未售 加入掉绑  手机号取 changeTel
        tel = row.changeTel;
      }
      if (reg.test(row.accountNumber)) {
      } else {
        this.$alert(`QQ号码不正确或商品账号不是QQ号，无法添加！`);
        return;
      }
      if (reg2.test(tel)) {
      } else {
        this.$alert(`手机号码不正确，无法添加！`);
        return;
      }
      row.tel = tel;
      this.$refs.addCheckPhone.open(row);
    },
    // 复制商品信息
    keyCopy(item) {
      // let hostt = `${this.retailDomainList[0].dictValue}/#/pages/detail/index?id=${item.id}`
      // \n图片：${hostt}
      this.copyVlaue = `商品ID：${item.id}\n区服：${
        item.systemName ? item.systemName + "/" : ""
      }${item.carrierName ? item.carrierName + "/" : ""}${item.groupName}${
        item.serverName
      }\n简介：${item.des}`;
    },
    // 复制成功和失败的方法
    onCopy(e) {
      this.$modal.msgSuccess("复制成功");
      this.copyVlaue = "";
    },
    onError() {
      this.$modal.msgError("复制失败");
      this.copyVlaue = "";
    },
    //重置
    resetQuery() {
      let dataType = this.queryParams.dataType;
      this.queryParams = {
        pageNum: 1,
        pageSize: 10,
        saleState: "",
        // operType: "supply",
        sort: "",
        sortColumn: "",
        dataType: dataType,
      };
      this.queryParams.saleState = 1;
      if(this.actived == '2') {
        this.queryParams.isQuality = 1;
      }else {
        this.queryParams.isQuality = '';
      }
      this.getList();
    },
    // getHost() {
    //   getDicts("apphost").then(res => {
    //     if (res.code == 200) {
    //       ////console.log(res);
    //       if (res.data.length > 0) {
    //         this.hoste = res.data[0].dictValue;
    //       }
    //     }
    //   });
    // },
    // 每页条数改变
    handleSizeChange(val) {
      this.queryParams.pageSize = val;
      this.getList();
    },
    // 页码改变
    handleCurrentChange(val) {
      this.queryParams.pageNum = val;
      this.getList();
    },
  },
};
</script>
<style lang="scss" scoped>
.zdy-des {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 6px 0;
}
.btn .el-button {
  margin-right: 5px;
}

#qrCode {
  display: inline-block;
  margin: 0 auto;
  /*水平居中*/
  position: relative;
  top: 15%;

  /* img: {
    width: 200px;
    height: 200px;
    background-color: #fff; //设置白色背景色
    padding: 6px; // 利用padding的特性，挤出白边
  } */
}

.search-form-new ::v-deep .el-input {
  width: 200px !important;
}

.sign {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: #ffcc66;
  border-radius: 50%;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  color: #fff;
  margin-right: 5px;

  &.ping {
    background-color: #1890ff;
  }
}
.xsgz-btn {
  position: absolute;
  right: 250px;
  top: 7px;
  z-index: 99;
}
// .tuisongbtn ::v-deep .el-dropdown-menu {
//   max-height: 600px;
//   overflow-y: hidden;
// }
::v-deep .el-message-box__message {
  word-break: break-all;
}
::v-deep .search-form-new .el-input__inner {
  text-align: left;
}
</style>
<style>
.el-dropdown-menu {
  max-height: 600px;
  overflow-y: auto;
}
</style>
